import request from '@/utils/request'

/**
 * 登录
 * @param data
 * @returns {Promise<void>}
 */
export async function login(data) {
  return request.post('/admin/login', data)
}

/**
 * 获取验证啊
 * @param data
 * @returns {Promise<*>}
 */
export async function getVerifyCode(data = {}) {
  return request.post('/admin/verCode', data, {
    responseType: 'arraybuffer',
  })
}

/**
 * 修改密码
 * @param data
 * @returns {Promise<*>}
 */
export async function updatePwd(data = {}) {
  return request.post('/admin/updatePwd', data)
}
